<docs>
  ## 简历首页
</docs>
<template>
  <!-- 内边距container 开始 -->
  <div class="con-layout resume">
    <my-bread title="简历"></my-bread>
    <div class="content" v-if="data.xtdsl>=0">
      <div class="resumeItem" @click="goLink('/resume/newDelivery')">
        <i class="itemImg resumeIcon1"></i>
        <p class="itemName">新投递</p>
        <div class="itemStrip">
          <b>{{data.xtdsl}}</b>条
        </div>
      </div>
      <div class="resumeItem" @click="goLink('/resume/invited')">
        <i class="itemImg resumeIcon2"></i>
        <p class="itemName">已邀约</p>
        <div class="itemStrip">
          <b>{{data.yyysl}}</b>条
        </div>
      </div>
      <div class="resumeItem" @click="goLink('/resume/collected')">
        <i class="itemImg resumeIcon3"></i>
        <p class="itemName">已收藏</p>
        <div class="itemStrip">
          <b>{{data.yscsl}}</b>条
        </div>
      </div>
      <div class="resumeItem" @click="goLink('/resume/rejected')">
        <i class="itemImg resumeIcon4"></i>
        <p class="itemName">已拒绝</p>
        <div class="itemStrip">
          <b>{{data.yjjsl}}</b>条
        </div>
      </div>
      <div class="resumeItem" @click="goLink('/resume/lately')">
        <i class="itemImg resumeIcon5"></i>
        <p class="itemName">最近浏览条数</p>
        <div class="itemStrip">
          <b>{{data.zjllsl}}</b>条
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "index",
  data() {
    return {
      data:{}
    };
  },
  created(){
    this.init();
  },
  methods:{
    init(){
      this.$loading = true;
      this.$http({
        url:'/msgl/yyyZs',
        method:'get'
      }).then((res)=>{
        let _res = res.returnData;
        if(+_res.executeResult == 1){
          this.data = _res.jlsl;
        }else{
          this.$alert({
            message:_res.message
          });
        }
      }).finally(()=>{
      this.$loading = false;
      });
    },
    goLink(link){
      if (link == '/resume/invited' || link == '/resume/newDelivery') {
        this.$router.push({path:link,query:{type:'0'}});
      }else{
        this.$router.push({path:link});
      }
    }
  }
};
</script>
<style scoped lang="scss">
@import "~common/scss/var.scss";
.resume {
  .content {
    .resumeItem {
      background-color: #ffffff;
      padding: 42px 33px;
      margin-bottom: 4px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .itemImg {
        width: 83px;
        height: 83px;
      }
      .itemName {
        flex: 1;
        padding-left: 34px;
        font-size: 33px;
        color: #4D4D4D;
      }
      .itemStrip {
        width: 200px;
        text-align: right;
        font-size: 24px;
        color:#aaa;
        b{
          font-size: 33px;
          color: #1D66D4;
          font-weight: normal;
          letter-spacing:4px;
        }
      }
      // 新投递
      .resumeIcon1 {
        background: url("~common/images/resume/xtd.png") center center no-repeat;
        background-size: 83px;
      }
      // 已邀约
      .resumeIcon2 {
        background: url("~common/images/resume/yyy.png") center center no-repeat;
        background-size: 83px;
      }
      // 已收藏
      .resumeIcon3 {
        background: url("~common/images/resume/ysc.png") center center no-repeat;
        background-size: 83px;
      }
      // 已拒绝
      .resumeIcon4 {
        background: url("~common/images/resume/yjj.png") center center no-repeat;
        background-size: 83px;
      }
      // 最近浏览条数
      .resumeIcon5 {
        background: url("~common/images/resume/zjllts.png") center center no-repeat;
        background-size: 83px;
      }
    }
  }
}
</style>
